﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace VoteSystem.Models
{
    public class VoteResultDto
    {
        public int EmployeeId { get; set; }

        public int PositionId { get; set; }

        public int Round { get; set; }

        public override int GetHashCode()
        {
            return EmployeeId.GetHashCode() ^ PositionId.GetHashCode() ^ Round.GetHashCode();
        }

        public override bool Equals(object obj)
        {
            if (obj == null) return false;
            VoteResultDto temp = null;
            if( ( temp =(obj as VoteResultDto) )== null) return false;
            return temp.EmployeeId == this.EmployeeId &&
                    temp.PositionId == this.PositionId &&
                    temp.Round == this.Round;
        }
    }
}